//
//  Y2DevicePermission.h
//  Y2Common
//
//  Created by Mac on 2021/6/1.
//

#import <Foundation/Foundation.h>



@interface Y2DevicePermission : NSObject

///  请求IDFA权限
+ (void) requestIDFA:(void(^)(NSString *idfa))result;

/// 判断应用是否有用户授予的权限
+ (BOOL) hasAuthorityMedia:(NSString *)mediaType;

/// 判断设备是否有摄像头
+ (BOOL) isCameraAvailable;

/// 前置的摄像头是否可用
+ (BOOL) isFrontCameraAvailable;

/// 后置的摄像头是否可用
+ (BOOL) isRearCameraAvailable;

/// 检查摄像头是否支持录像
+ (BOOL) doesCameraSupportShootingVideos;

/// 检查摄像头是否支持拍照
+ (BOOL) doesCameraSupportTakingPhotos;

/// 相册是否可用
+ (BOOL) isPhotoLibraryAvailable;

/// 是否可以在相册中选择视频
+ (BOOL) canUserPickVideosFromAlbum;

/// 是否可以在相册中选择照片
+ (BOOL) canUserPickPhotosFromAlbum;

@end
